[backport core/1.38] fix: prevent image/video preview reset on dynamic widget addition#8492
Merged
AustinMroz merged 1 commit intocore/1.38from Jan 30, 2026
Merged
Conversation
) ## Summary Fixes image/video previews getting stuck in loading state when widgets are added dynamically to a node. ## Problem When dynamic widgets are added to a node (e.g., by extensions), Vue reactivity triggers the watch on `imageUrls` prop even when the URL content is identical—the array has a new reference but the same values. This caused: 1. `startDelayedLoader()` to reset loading state to pending 2. If the cached image doesn't trigger `@load` before the 250ms timeout, the loader shows and stays stuck ## Solution Compare URL arrays by content, not reference. Only reset loading state when URLs actually change: - Check array length and element-by-element equality - Return early if URLs are identical (just a new array reference) - Remove `deep: true` since we compare manually ## Screenshots <img width="749" height="647" alt="image" src="https://github.com/user-attachments/assets/3a1ff656-59ed-467a-a121-b70b91423a50" /> <img width="749" height="647" alt="Screenshot from 2026-01-28 15-24-18" src="https://github.com/user-attachments/assets/28265dad-1d79-47c8-9fd4-5a82b94e72cd" /> <img width="749" height="647" alt="Screenshot from 2026-01-28 15-24-05" src="https://github.com/user-attachments/assets/c7af93b7-c898-405f-860b-0f82abe5af6d" /> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8366-fix-prevent-image-video-preview-reset-on-dynamic-widget-addition-2f66d73d3650819483b2d5cbfb78187f) by [Unito](https://www.unito.io) --------- Co-authored-by: Subagent 5 <subagent@example.com> Co-authored-by: Amp <amp@ampcode.com>
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 01/30/2026, 04:29:37 PM UTC 🔗 Links🎉 Your Storybook is ready for review! |
AustinMroz
approved these changes
Jan 30, 2026
🎭 Playwright Tests:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #8366 to
core/1.38Automatically created by backport workflow.
┆Issue is synchronized with this Notion page by Unito